﻿using System;
using System.Net;

namespace Hydra.Shell.ProjectionAttributes
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class MetadataForTypeAttribute : Attribute
    {
        private Type _metadataForClassType;

        public MetadataForTypeAttribute(Type metadataForClassType)
        {
            this._metadataForClassType = metadataForClassType;
        }

        public Type MetadataForClassType
        {
            get
            {
                if (this._metadataForClassType == null)
                {
                    throw new Exception("Type Cannot Be Null");
                }

                return this._metadataForClassType;
            }
        }
    }
}
